import { createApp } from "vue";
import App from "./App.vue";
const app = createApp(App);

import { createPinia } from "pinia";
const pinia = createPinia();
app.use(pinia);

import router from "./router";
app.use(router);

import ElementPlus from "element-plus";
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
import "element-plus/dist/index.css";
import "element-plus/theme-chalk/dark/css-vars.css";
app.use(ElementPlus);
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component);
}

import axios from "axios";
import VueAxios from "vue-axios";
app.use(VueAxios, axios);

import VueVirtualScroller from "vue-virtual-scroller";
import "vue-virtual-scroller/dist/vue-virtual-scroller.css";
app.use(VueVirtualScroller);

import VMdPreview from "@kangc/v-md-editor/lib/preview";
import "@kangc/v-md-editor/lib/style/preview.css";
import githubTheme from "@kangc/v-md-editor/lib/theme/github.js";
import "@kangc/v-md-editor/lib/theme/style/github.css";
import hljs from "highlight.js";
VMdPreview.use(githubTheme, {
  Hljs: hljs,
});
app.use(VMdPreview);

import dragMove from "./utils/dragMove.js";
app.use(dragMove);

import vDrag from "./utils/vDrag.js";
app.use(vDrag);

import "default-passive-events";

import "@/styles/index.css";
import "@/styles/msgbox.css";
// import "@/styles/98.css";
// import "@/styles/98custom.css";
app.mount("#app");
